package com.tronsis.distribution.biz;

import android.app.Activity;
import android.content.Context;

import com.tronsis.distribution.bean.UserBean;
import com.tronsis.library.http.UICallBack;


/**
 *
 */
public interface UserBiz {
    /**
     * 用户登录
     *
     * @param activity
     * @param phone
     * @param password
     * @param callBack
     * @throws Exception
     */
    void login(Activity activity, String phone, String password, UICallBack callBack) throws Exception;

    /**
     * 发送注册/忘记密码短信,1次/1分钟/1号,1次/10秒/IP
     *
     * @param activity
     * @param phone
     * @param callBack
     * @throws Exception
     */
    void getSmsCode(Activity activity, String phone, UICallBack callBack) throws Exception;


    /**
     * 用户注册
     *
     * @param activity
     * @param phone
     * @param password
     * @param inviteCode
     * @param callBack
     * @throws Exception
     */
    void register(Activity activity, String phone, String password, String inviteCode, String smsCode, UICallBack callBack) throws Exception;

    /**
     * 忘记密码
     *
     * @param activity
     * @param phone
     * @param password
     * @param smsCode
     * @param callBack
     * @throws Exception
     */
    void forgetPassword(Activity activity, String phone, String password, String smsCode, UICallBack callBack) throws Exception;

    /**
     * @param activity
     * @param appNotice
     * @param avatarFid
     * @param idCardName
     * @param idCardNo
     * @param name
     * @param password
     * @param phone
     * @param region
     * @param wechatId
     * @param wechatVcardFid
     * @param callBack
     * @throws Exception
     */
    void updateInfo(Activity activity, boolean appNotice, String avatarFid, String idCardName, String idCardNo, String name, String password, String phone, String region, String wechatId, String wechatVcardFid, UICallBack callBack) throws Exception;


    /**
     * @param activity
     * @param callBack
     * @throws Exception
     */
    void getRegionHistory(Activity activity, UICallBack callBack) throws Exception;

    /**
     * @param activity
     * @param callBack
     * @throws Exception
     */
    void getUserInfo(Activity activity, UICallBack callBack) throws Exception;

    /**
     * @param activity
     * @param callBack
     * @throws Exception
     */
    void getPayeeMethod(Activity activity, UICallBack callBack) throws Exception;


    /**
     * @param activity
     * @param account
     * @param bank
     * @param name
     * @param callBack
     * @throws Exception
     */
    void addPayeeMethod(Activity activity, String account, String bank, String name, UICallBack callBack) throws Exception;

    /**
     * @param activity
     * @param account
     * @param bank
     * @param name
     * @param payeeId
     * @param callBack
     * @throws Exception
     */
    void updatePayeeMethod(Activity activity, String account, String bank, String name, String payeeId, UICallBack callBack) throws Exception;


    /**
     * @param activity
     * @param payeeId
     * @param callBack
     * @throws Exception
     */
    void deletePayeeMethod(Activity activity, String payeeId, UICallBack callBack) throws Exception;


    /**
     * @param activity
     * @param callBack
     * @throws Exception
     */
    void getAddress(Activity activity, UICallBack callBack) throws Exception;

    /**
     * @param activity
     * @param detail
     * @param name
     * @param phone
     * @param region
     * @param callBack
     * @throws Exception
     */
    void addAddress(Activity activity, String detail, String name, String phone, String region, UICallBack callBack) throws Exception;

    /**
     * @param activity
     * @param addrId
     * @param detail
     * @param name
     * @param phone
     * @param region
     * @param callBack
     * @throws Exception
     */
    void updateAddress(Activity activity, String addrId, String detail, String name, String phone, String region, UICallBack callBack) throws Exception;

    /**
     * @param activity
     * @param addrId
     * @param callBack
     * @throws Exception
     */
    void deleteAddress(Activity activity, String addrId, UICallBack callBack) throws Exception;

    /**
     * @param activity
     * @param page
     * @param size
     * @param callBack
     * @throws Exception
     */
    void getNotice(Activity activity, Integer page, Integer size, UICallBack callBack) throws Exception;

    /**
     * 我的未读消息计数
     *
     * @param activity
     * @param callBack
     * @throws Exception
     */
    void getUnread(Activity activity, UICallBack callBack) throws Exception;

    /**
     * 获取我当前的积分
     *
     * @param activity
     * @param callBack
     * @throws Exception
     */
    void getMyPoint(Activity activity, UICallBack callBack) throws Exception;

    /**
     * 在数据库缓存用户信息
     *
     * @param context
     * @param user
     */
    void cacheUserInfo(Context context, UserBean user);

    /**
     * 获取当前登录用户的信息
     *
     * @param context
     * @return
     */
    UserBean getLoginUser(Context context);

    /**
     * 获取用户登录后产生的token
     *
     * @param context
     * @return
     */
    String getToken(Context context);


    /**
     * 获取已登录用户的id
     *
     * @param context
     * @return
     */
    String getLoginUserId(Activity context);

    /**
     * 退出登录
     *
     * @param context
     */
    void logout(Activity context);

    //积分信息

    /**
     * 列出积分提现日志
     *
     * @param activity
     * @param page
     * @param size
     * @param callBack
     * @throws Exception
     */
    void getPointsWithDrawLog(Activity activity, Integer page, Integer size, UICallBack callBack) throws Exception;

    /**
     * 列出积分提现
     *
     * @param activity
     * @param page
     * @param size
     * @param callBack
     * @throws Exception
     */
    void getPointsWithDraw(Activity activity, Integer page, Integer size, UICallBack callBack) throws Exception;

    /**
     * 申请积分提现
     *
     * @param activity
     * @param point
     * @param callback
     * @throws Exception
     */
    void applyPointWithDraw(Activity activity, String point, UICallBack callback) throws Exception;

    /**
     * 删除已完成积分提现
     *
     * @param activity
     * @param withdrawId
     * @param callBack
     * @throws Exception
     */
    void deleteFinishPointWithDraw(Activity activity, String withdrawId, UICallBack callBack) throws Exception;


    /**
     * 确认积分提现
     *
     * @param activity
     * @param withdrawId
     * @param callBack
     * @throws Exception
     */
    void confirmPointWithDraw(Activity activity, String withdrawId, UICallBack callBack) throws Exception;

    /**
     * 积分提现申诉
     *
     * @param activity
     * @param withdrawId
     * @param detail
     * @param imageFid
     * @param reason
     * @param callBack
     * @throws Exception
     */
    void reportPointWithDraw(Activity activity, String withdrawId, String detail, String imageFid, String reason, UICallBack callBack) throws Exception;

    /**
     * 列出积分提现请求
     *
     * @param activity
     * @param page
     * @param size
     * @param state
     * @param callBack
     * @throws Exception
     */
    void getPointAskWithDraw(Activity activity, Integer page, Integer size, String state, UICallBack callBack) throws Exception;

    /**
     * 删除申诉中的积分提现处理
     *
     * @param activity
     * @param withdrawId
     * @param callBack
     * @throws Exception
     */
    void deletePointAskWithDraw(Activity activity, String withdrawId, UICallBack callBack) throws Exception;

    /**
     * 积分提现付款
     *
     * @param activity
     * @param withdrawId
     * @param paymentFid
     * @param callBack
     * @throws Exception
     */
    void payPointAskWithDraw(Activity activity, String withdrawId, String paymentFid, UICallBack callBack) throws Exception;

    /**
     * 积分提现补充付款凭证
     *
     * @param activity
     * @param withdrawId
     * @param paymentFid
     * @param callBack
     * @throws Exception
     */
    void payMorePointAskWithDraw(Activity activity, String withdrawId, String paymentFid, UICallBack callBack) throws Exception;

}
